package com.supermap.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther EdgarLQS
 * @Date 2021-05-26 21:30
 */
@RestController
public class HelloController {

    /**
     * 使用 @Value 注解，直接从配置文件中获取一个具体的值
     */
    @Value("${person.last-name}")
    private String name;

    @RequestMapping("/sayHello")
    public String sayHello(){
        return "Hello "+ name;
    }
}
